package expressions.slogo;

import java.util.List;
import parsing.Separates;
import parsing.Token;
import expressions.Operator;

@Token(regex = "%")
@Separates
public class Mod extends Operator<Double>
{
    public Mod()
    {
        super(2);
    }

    @Override
    public int priority()
    {
        return Priority.ARITHMETIC.adjust(Modifier.MIDDLE);
    }

    @Override
    protected Double combineResults(List<Double> results)
    {
        return results.get(0) % results.get(1);
    }

}